﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Security;

namespace Medianamik.Core.Security
{
    public static class MembershipProviderExtensions
    {
        public static MembershipUser CreateUser(this MembershipProvider provider , string username, string password, string email, string defaultGroup, bool isApproved, out MembershipCreateStatus status)
        {
            var user = provider.CreateUser(username, password, email, default(string), default(string), isApproved, default(object), out status);
            Roles.AddUserToGroup(user.UserName, defaultGroup);
            return user;
        }
    }
}
